package cn.com.spotty.springdemo.aop;

import org.aspectj.lang.ProceedingJoinPoint;

public class IndexAspect {

	public void before() {
		System.out.println("[before]>>>>>>>>>开始执行>>>>>>>>>");
	}

	public void after() {
		System.out.println("[after]>>>>>>>>>执行结束>>>>>>>>>");
	}

	public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
		String methodName = joinPoint.getSignature().getName();
		System.out.println("[around]>>>>>>>>>" + methodName + "开始执行>>>>>>>>>");
		Object result= joinPoint.proceed();
		System.out.println("[around]>>>>>>>>>" + methodName + "执行结束>>>>>>>>>");
		return result;
	}
}
